/*======================================================================*\
|| #################################################################### ||
|| # Yet Another Award System 3.5 v2.1.2  by HacNho                  # ||
|| # Copyright (C) 2005 by HacNho, All rights reserved.               # ||
|| # ---------------------------------------------------------------- # ||
|| # For use with vBulletin Version 3.5.x                             # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| # Discussion and support available at                              # ||
|| # http://www.vbulletin.org/forum/showthread.php?t=94836            # ||
|| # ---------------------------------------------------------------- # ||
|| # CVS: $RCSfile: awards.php,v 2.1.2 - Revision: 051128             # ||
|| #################################################################### ||
\*======================================================================*/

Hack Version: 2.1.2.051128
Compatible vB version: 3.5.x
Support: http://www.vbulletin.org/forum/showthread.php?t=94836
Alternative version for vB 3.0.x: http://www.vbulletin.org/forum/showthread.php?t=78934

DESCRIPTION:
This is a Medals/Awards system. Admin can give members awards, and award icons will be displayed in member's profile, posts, as well as in a award list.

FEATURES:
In ACP
- Can Create/Edit/Delete/Reorder categories/sub-categories in ACP (with category name and description)
- Can Create/Edit/Delete awards in ACP (with Award Name, Description, Icon URL, Image URL)
- Can Move one (or all) award(s) from one category to another
- Can set some awards un-classified (not displayed for public)
- Can re-order awards in awards showcase
+ Issue awards to members, based on username or userid, with Issue Reason
+ Remove awards from members
- [1.2] Options to set number of awards displayed in postbit
- [1.2] Options to turn on/off showing award icon, images, award requests in awards list, awards icons in memberlist
- [2.1.0] Options to re-order awards in postbit and member's profile 
 >Order by issued time (newest first)
 >Order by issued time (oldest first)
 >Order by Award Order (ASC)
 >Order by Award Order (DESC)
- [2.1.0] Option to set award in-active. Inactive awards will not be listed in award list. However, it will still be displayed in user's profile, if member has the award.
- [2.1.0] Option to set "Request Award" option for each award. (Need "Show request award column" option ON to see the request link)
- [2.1.0] Set custom usergroup permission, to set which group can request award (access request award page)
- [2.1.0] Option to limit maximum number of users for each award displayed in awards list
- [2.1.0] Change award_request options, all options are set in AdminCP, template and phrase based. Totally cumsomizable
- [2.1.0] Option to send PM to use when he receives an award.

Front page
- Display awards list in with: Award Name, Description, Icon, Image, and Members who get each award.
- Display awards showcase in profile, with Award information, Issue time and reason
- Display award icons in postbit (showthread, showpost, announcement, private)
[1.2] Display limit awards in postbit, with total awards, and a link to awards showcase in member profiles.
[1.2] Award request, link to a form sending to email/PM/new thead or post (based on Dr Erwin Loh's Form hack)
[1.2] Display award on Memberlist page (by trulylowcarb)
[2.1.0] Display individual award with name of members who receive the award


CHANGES/MODIFICATION:
(to do)
- Files to add: 6 (/awards.php, /award_request.php, /admincp/award.php, /admincp/award_cat.php, /includes/xml/postbbit_awards.xml, /includes/xml/cpnav_awards.xml)
- Templates to edit: 5 (MEMBERINFO, postbit, postbit_legacy, memberlist, memberlist_resultsbit)
(automatic)
- Templates to add: 9 ('AWARDS', 'awards_awardbit','awards_awardusers_bit','awards_bit','awards_userawards_bit','awards_category','awards_categorybit', 'awards_request_form', 'awards_request_formanswers')
- Phrases to add: xxx
- Tables to add: 3 (award, award_user, award_cat)


DIFFICULTY:
Easy
Time: about 2 minutes
Installer is included

HISTORY:
2005.11.27: Version 2.1.0 Add functions, Change award request options
2005.11.12: 2.0.6 - remove $this->post['userid'] check in showthread
2005.11.02: 2.0.5 - fix error when display non-user's single post
2005.10.16: 2.0.4 - fix display award after quickreply
2005.10.11: 2.0.3 - fix Display award in PM and announcement, change award request template (thanks y2krazy)
2005.10.07: Allow edit issued award
2005.09.05: Version 2.0.1 bug fix
2005.08.22: version 2.0.0 for vB 3.5

2005.04.14: Version 1.2.0
2005.04.03: Version 1.1
2005.03.29: Version 1.0.1b
2005.03.28: Version 1.0.1
2005.03.28: Initial release

FUTURE PLAN:
- Allow comments on user's award (by Arial)
- PM/Email user when he/she get an award.
- Allow voting on user's award (by Arial)

ADD ONs
How-to for importing from phpBB's Medal System Mod
http://www.vbulletin.org/forum/showpost.php?p=827421&postcount=171

CREDIT:
Idea has been carried on by many people, here are some:
- Lesane for original Award hack for vB2, eventhough I've never use his hack
- AnimeWebby for Awards/ Medals/ Cards Hack [vB3], which I write new code based on his.
- Mac ycl6 for phpBB Medal System for phpBB forum
- Dr Erwin Loh for FORM TO THREAD/ FORUM/ PM/ EMAIL hack
- and all others for supports and ideas

IMPORTANT:
- BACKUP modified files and templates before making changes.
- Backup database is recommended.
- This hack is NOT compatible with AnimeWebby's Awards/Medals/CardsHack [vB3], you need to UNINSTALL his hack, before installing this one.

MANUAL:
Included in zip file attached HERE:
http://www.vbulletin.org/forum/showthread.php?t=94836

SCREENSHOT:
Included in the zip file

DEMO:
vB 3.5.x
http://www.trackpads.com/forum/awards.php
http://www.trackpads.com/forum/showpost.php?p=2221442
http://www.trackpads.com/forum/member.php?u=3#award
http://www.trackpads.com/forum/memberlist.php

vB 3.0.x
http://www.global-army.com/forum/awards.php
http://www.global-army.com/forum/sh...p=9253#post9253
http://www.global-army.com/forum/member.php?u=22#award

DONATIONS:
YAAS is free, but a donation of any amount is much appreciated. 


INSTALL: Read INSTALL.txt

UGRADE: Read UPGRADExxx.txt